<template>
  <div class="app">
    <el-config-provider :locale="localeValue">
      <router-view />
    </el-config-provider>
  </div>
</template>

<script setup lang="ts">
import { computed } from "vue"
import { useI18n } from "vue-i18n"
import { ElConfigProvider } from "element-plus"
import zhCn from "element-plus/dist/locale/zh-cn.mjs"
import en from "element-plus/dist/locale/en.mjs"

const { locale } = useI18n()

const localeValue = computed(() => {
  if (locale.value === "en") {
    return en
  } else if (locale.value === "zhCn") {
    return zhCn
  }
  return en
})
</script>

<style lang="scss" scoped></style>
